﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Catering.View_Operaction;
using System.Data;
using Microsoft.Reporting.WebForms;

namespace Catering.Catering_Page.Kufang
{
    public partial class GroceryDetail : UserIsNull
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            string CLASSID = DDLTool1.GetDDL_Class();
            string AREAID = DDLTool1.GetDDL_Area();
            DateTime DTIME = DateTime.Parse(DDLTool1.GetYear() + "-1");
            string pid = "0";
            if (Session["UserID"] != null) pid = Session["UserID"].ToString();
            DataTable dt = new View_Monitor().GetGroceryDetail(pid,AREAID, CLASSID, DTIME);
            if (dt == null)
            {
                return;
            }
            ReportDataSource rds = new ReportDataSource("DataSet1", dt);
            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(rds);
            ReportViewer1.LocalReport.Refresh();
            ReportViewer1.Visible = true;
        }
    }
}